package com.word.teacher.service;

import com.word.teacher.domain.WordGroupDict;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("wordDict")
public class WordDictService {
    @Autowired
    private IWordGroupDictService wordGroupDictService;

    /**
     * 根据字典ID查询字典信息
     * @param dictId 字典ID
     * @return 字典信息
     */
    public String getValue(Long dictId) {
        return wordGroupDictService.selectWordGroupDictById(dictId).getValue();
    }

    /**
     * 查询字典列表
     * @return 字典列表
     */
    public List<WordGroupDict> getType() {
        return wordGroupDictService.selectAllDict();
    }
}
